package com.onpositive.image.factories;

import java.util.HashMap;

import com.onpositive.image.fitting.tools.BasicImageFitter;



public class ImageFitterFactory {
	
	public static final String ID_BASIC_IMAGE_FITTER = "basic-image-fitter";
	
	private static ImageFitterFactory instance ;
	
	private HashMap<String,AbstractImageFitter> map ;
	
	public static ImageFitterFactory getInstance() {
		if( instance == null )
			instance = new ImageFitterFactory();
		
		return instance;
	}

	private ImageFitterFactory(){
		
		map = new HashMap<String, AbstractImageFitter>() ;
		map.put( ID_BASIC_IMAGE_FITTER , new BasicImageFitter() ) ;		
	}
	
	public AbstractImageFitter getFitter( String id ){
		
		return map.get( id ) ;		
	}

}
